/**
 * 
 */
package dbexel.system.tools;


import java.io.IOException;
import java.util.Properties;



/**
 * @author Baubak
 * 
 */
public class FileUtils {

	
	/**
	 * This method returns the properties used by the application
	 * 
	 * @return
	 */
	public static Properties fetchProperties() {
		Properties l_props = new Properties();
		try {
			l_props.load(Thread.currentThread().getContextClassLoader()
					.getResourceAsStream("dbexel.properties"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return l_props;
	}

	
	/**
	 * This method returns the property given its name
	 * 
	 * @param in_propertyName
	 * @return
	 */
	public static String fetchProperty(String in_propertyName) {
		return fetchProperties().getProperty(in_propertyName);
	}
}
